<?php

require_once dirname(__FILE__).'/../lib/subjectGeneratorConfiguration.class.php';
require_once dirname(__FILE__).'/../lib/subjectGeneratorHelper.class.php';

/**
 * subject actions.
 *
 * @package    wiki
 * @subpackage subject
 * @author     Elmaho
 * @version    SVN: $Id: actions.class.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
 */
class subjectActions extends autoSubjectActions
{
  public function executeNew(sfWebRequest $request)
  {
  	parent::executeNew($request);
  	
  	$domain = $request->getParameter("domain");
  	if($domain)
  		$this->form->setDomain($domain);
  }
  
	public function executeShow(sfWebRequest $request)
	{
		$this->subject = Doctrine_Core::getTable('Subject')->find(array($request->getParameter('id')));
    	$this->forward404Unless($this->subject);
	}
}
